In [ ]:
from P4_sandbox import helper_functions as hf
from P4_sandbox import overplot_blotches as ob
from P4_sandbox import get_data
reload(hf)
reload(ob)
In [ ]:
data = ob.data_munging('APF0000bha')
colors = ob.cycle('bgrcmyk')
In [ ]:
img_id = 'APF0000bha'
fans = ob.get_fans(data, img_id)
fig, ax = plt.subplots()
ax.imshow(get_data.get_image_from_record(fans.iloc[0]))
In [ ]:
ax.set_title('image_id {}'.format(img_id))
ims = []
for i, color in zip(xrange(len(blotches),), colors):
line = blotches.iloc[i]
artist1 = plt.scatter(line.x, line.y, color=color)
el = Ellipse((line.x, line.y),
line.radius_1, line.radius_2, line.angle,
fill=False, color=color, linewidth=1)
plt.savefig('_tmp{}.png'.format(str(i).zfill(3)))
In [ ]:
import matplotlib.animation as animation
In [ ]:
Writer = animation.writers['ffmpeg']
In [ ]:
writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)
In [ ]:
animation.ArtistAnimation?
In [ ]:
anim = animation.ArtistAnimation(fig, ims)
In [ ]:
anim.save('ellipses.mp4',writer=writer)
In [ ]:
from subprocess import call
call('ffmpeg -r 3 -i _tmp%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4',
shell=True)
This file describes the parameters for this production run of RDR2.
/luna4/maye/rdr_out/verification
In [ ]: